Skip to content

Fix Oboe audio build error and optimize for "near-zero" latency - #115

Merged
winnerspiros merged 1 commit into
masterfrom
fix-oboe-audio-optimizations-and-build-error-8255708055978411559
Mar 30, 2026
Merged

Fix Oboe audio build error and optimize for "near-zero" latency#115
winnerspiros merged 1 commit into
masterfrom
fix-oboe-audio-optimizations-and-build-error-8255708055978411559

Conversation

@google-labs-jules

Copy link
Copy Markdown

This PR addresses the build error and audio duplication issues reported with the Oboe audio redirection.

Key changes:

  • Fixed "Unboxing a possibly null value" error in OboeAudioRedirector.cs by using safe pattern matching (is int h ? h : 0) for reflection-based handle retrieval.
  • Optimized the C# mixing loop with System.Numerics.Vector<float> (SIMD) to achieve near-zero processing overhead in the audio path.
  • Implemented CPU affinity in oboe_bridge.cpp to pin the audio callback thread to high-performance/exclusive cores, significantly reducing latency jitter.
  • Fixed duplicated audio by cleanly switching BASS mixers to the "No Sound" device (Device 0) when Oboe is active. This silences the default BASS output path without using hacky volume mutes.
  • Improved lifecycle management in OsuGameAndroid.cs to ensure BASS devices are correctly restored when Oboe is disabled.

PR created automatically by Jules for task 8255708055978411559 started by @winnerspiros

- Fixed "Unboxing a possibly null value" error in OboeAudioRedirector.cs by using safe pattern matching.
- Optimized C# mixing loop with Vector<float> (SIMD).
- Implemented CPU affinity in oboe_bridge.cpp.
- Fixed duplicated audio by cleanly switching BASS mixers to the "No Sound" device (Device 0).
- Improved Oboe lifecycle management in OsuGameAndroid.cs.
@google-labs-jules

Copy link
Copy Markdown
Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@winnerspiros
winnerspiros merged commit 0d55175 into master Mar 30, 2026
6 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant